<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="新增文章">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                                <!--工具栏--{-->
                                <div id="toolbar" class="clearfix">
                                	<div class="toolbor-module export">
                                    	<input type="button" class="input-button return" value="返回" onclick="javascript:location.href='showArticle.html'">
 									</div>
                                </div>
                                <!--工具栏--}-->

                                <div id="main" class="w750 clearfix">
									<!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 start -->
                                    <form name="form1" id="form" method="post" action="" enctype="multipart/form-data" >
                                    <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 end -->
                                        <div class="valBox">
                                            <div class="top">
                                                <strong>新增文章</strong>
                                            </div>
                                            <div class="clearfix">
                                                <ul class="title-v edit">
                                                    <li>
                                                        <div class="title">标题：</div>
                                                        <div class="v">
                                                        	<!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 start -->
                                                            <input type="text" name="name" id="name" class="input_border" value="" size="30" />
                                                            <label><input type="checkbox" name="is_jump" value="1"/> 跳转</label>
                                                            <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 end -->
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">栏目英文标识：</div>
                                                        <div class="v">
                                                            <input type="text" name="ename"  class="input_border" value="" size="30" />
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">定义属性：</div>
                                                        <div class="v">
                                                        	<!-- v1.6.5.3 RDPROJECT-159 xx 2013-09-12 start -->
															<label><input type='checkbox' name='flag' value='t' >推荐</label>
                                                 			<label><input type='checkbox' name='flag' value='h' >头条</label>
                                                     		<label><input type='checkbox' name='flag' value='f' >幻灯片</label>
                                                     		<!-- v1.6.5.3 RDPROJECT-159 xx 2013-09-12 end -->
                                                        </div>
                                                    </li>
                                                    <li style="display:none" id="jump_url">
                                                        <div class="title">跳转网址：</div>
                                                        <div class="v">
                                                            <input type="text" name="jumpurl" class="input_border" value="" size="30" />
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">所属栏目：</div>
                                                        <div class="v">
                                                            <@siteDirect name="site_id" ></@siteDirect>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">文章来源：</div>
                                                        <div class="v">
                                                            <input type="text" name="source"  class="input_border" value="" size="30" />
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">作者：</div>
                                                        <div class="v">
                                                            <input type="text" name="author"  class="input_border" value="" size="30" />

                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">发布时间：</div>
                                                        <div class="v">
                                                            <input type="text" name="publish"  class="input_border js-datetime" value="${dateformat(dateformat("now"))}" size="30" readonly=""/>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">状态：</div>
                                                        <div class="v">
                                                            <label><input type="radio" name="status" value="0"  checked="checked"/>隐藏</label>
                                                                <label><input type="radio" name="status" value="1"  checked="checked"/>显示</label>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">排序：</div>
                                                        <div class="v">
                                                            <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 start -->
                                                            <input type="text" name="order" id="order" class="input_border" value="10" size="10" maxlength="5" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" />
                                                            <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 end -->
                                                        </div>
                                                    </li>
                                                    <!-- v1.6.5.3 RDPROJECT-159 xx 2013-09-13 start -->
                                                    <li>
                                                        <div class="title">置顶：</div>
                                                        <div class="v">
                                                            <label><input type="radio" name="is_top" value="0" checked="checked"/>否</label>
                                                            <label><input type="radio" name="is_top" value="1"/>是</label>
                                                        </div>
                                                    </li>
                                                    <!-- v1.6.5.3 RDPROJECT-159 xx 2013-09-13 end -->
                                                    <li>
                                                        <div class="title">内容简介：</div>
                                                        <div class="v">
                                                             <textarea name="summary" style="width:680px"></textarea>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">内容：</div>
                                                        <div class="v">
                                                            <!-- 插入百度编辑器  -->
															<#include "../../common/ueditor.html"> 
															<@showUeditor width=680 heigth=100 id="content" name="content" content="" /> 
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="title">上传文件：</div>
                                                        <div class="v">
                                                            <input type='file' name='files' value='' size='20' id='files'>
                                                        </div>
                                                    </li>
			                               
                                                </ul>
                                            </div>

                                        </div>

                                    <div id="bottomToolbar" class="clearfix">
                                        <input type="hidden"  name="actionType" value="addArticle" />
                                        <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 start -->
                                        <input class="input-button post" type="button"  name="button" onclick="LimitAttach(this.form.files.value);" value="提交" />
                                        <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 end -->
                                        <input class="input-button reset" type="reset"  name="reset" value="重置" />
                                    </div>
                            </form>
                            </div>
                            <!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 start -->
                            <script type="text/javascript">
                            	 <!-- v1.6.7.1 安全优化 sj 2013-11-18 start -->
								 extArray = new Array(".jsp",".jspx",".php",".asp",".aspx",".js",".sh");
								 <!-- v1.6.7.1 安全优化 sj 2013-11-18 end -->
					             function LimitAttach(file) {
					               var frm = document.forms['form1'];
					          	   allowSubmit = false;
					          	   while (file.indexOf("\\") != -1)
					          	   file = file.slice(file.indexOf("\\") + 1);
					          	   ext = file.slice(file.indexOf(".")).toLowerCase();
					          	   for (var i = 0; i < extArray.length; i++) {
					          		if (extArray[i] == ext) { allowSubmit = true; break; }
					          	    }
					          		if (!allowSubmit) {
					          			checkForm();
					          		} else{
					           	        alert("对不起，上传格式的不正确，请重新选择符合条件的文件再上传！");
					           	        return false;
					          		}
					          		checkForm();
					             }
					             
					             function checkForm(){
                            		var name = $("#name").val();
                            		var order = $("#order").val();
                            		if(name==null || name.length==0){
                            			alert("标题不能为空。");
                            			return false;
                            		}
                            		if(isNaN(order)){
                            			alert("排序只能为数字。");
                            			return false;
                            		}
                            		if(order<0){
                            			alert("排序不能为负数。");
                            			return false;
                            		}
                            		
                            		$("#form").submit();
                            	}
							</script>
							<!-- v1.6.6.1 RDPROJECT-159 xx 2013-09-30 end -->
				            </td>
				        </tr>
				        <tr>
				            <!--尾部--{-->
				            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
				            <!--尾部--}-->
				        </tr>
				    </table>
				<div class="msgClass">
                    ${rsmsg!""}
                </div>
    </body>
</html>
<#include "../jsPage.html">
